package com.wgchao.identityrightsmanagement.infrastructure.jpa.entity;

import com.wgchao.identityrightsmanagement.domain.organization.model.Address;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * @ClassName: SysBaseAgency
 * @author: wgchao
 * @createTime: 2020/6/11 4:04 PM
 * @Description: TODO
 */
@Table(name = "sys_base_agency", uniqueConstraints = @UniqueConstraint(columnNames = {"agency_code"}))
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysBaseAgency {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id" )
    private Long id;

    //机构编号-唯一
    @Column(name = "agency_code", length = 50)
    private String agencyCode;

    //机构名称
    @Column(name = "agency_name", length = 100)
    private String agencyName;

    //地址
    @Column(name = "province", length = 20)
    private String province;

    @Column(name = "city", length = 20)
    private String city;

    @Column(name = "county", length = 20)
    private String county;

    @Column(name = "xxaddress", length = 200)
    private String xxaddress;

    //描述
    @Column(name = "description", length = 200)
    private String description;

    //是否可用
    @Column(name = "disabled")
    private Boolean disabled;

    @Column(name = "creator", length = 20)
    private String creator;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "last_updator", length = 20)
    private String lastUpdator;

    @Column(name = "last_update_time")
    private Date lastUpdateTime;

    @Column(name = "del")
    private Boolean del;

    @Version
    private Long version;

}
